﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using MedReg.Classes;

namespace MedReg
{
    [global::System.Runtime.Serialization.DataContractAttribute(Namespace = "StuffEntry", Name = "ArrayOfStaffEntry")]
    [XmlRoot("ArrayOfStaffEntry", Namespace = "StuffEntry", IsNullable = false)]
    public class StaffEntryCollection : ICollection
    {
        
        public string CollectionName;
        
        private ArrayList StuffEntry = new ArrayList();
        
        public StaffEntry this[int index]
        {
            get { return (StaffEntry)StuffEntry[index]; }
            set {this.Add(value);}
        }

        public void CopyTo(Array a, int index)
        {
            StuffEntry.CopyTo(a, index);
        }
        
        public int Count
        {
            get { return StuffEntry.Count; }
        }
        public object SyncRoot
        {
            get { return this; }
        }
        public bool IsSynchronized
        {
            get { return false; }
        }
        public IEnumerator GetEnumerator()
        {
            return StuffEntry.GetEnumerator();
        }

        public void Add(StaffEntry newStaffEntry)
        {
            StuffEntry.Add(newStaffEntry);
            
        }

        
    }
}
